nonlinux
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Thu, 7 Sep 2023 22:43:45 +0000 (00:43 +0200)
committerGianfranco Costamagna <locutusofborg@debian.org>
Thu, 7 Sep 2023 22:43:45 +0000 (00:43 +0200)
https://reviews.llvm.org/D143017

[Libomptarget] Fix disabling amdgpu on non-Linux.

Previously, on non-Linux, amdgpu would get enabled whatever the CPU
architecture.

Gbp-Pq: Topic amdgpu
Gbp-Pq: Name nonlinux.patch

openmp/libomptarget/plugins/amdgpu/CMakeLists.txt

index 66bf680d15c79c9445ce857546015368edcc58c8..1315939ffe8753f5659c45fa83a4c76d67f5ac2d 100644 (file)
@@ -27,7 +27,7 @@ if(NOT LIBOMPTARGET_DEP_LIBELF_FOUND)
   return()
 endif()
 
-if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux"))
   libomptarget_say("Not building AMDGPU plugin: only support AMDGPU in Linux x86_64, ppc64le, or aarch64 hosts")
   return()
 endif()